import sympy
import math

x = sympy.Symbol('x')
a = 0
b = math.pi / 2
f = sympy.exp(-sympy.sin(x))

M = f.subs(x, 0)
m = f.subs(x, math.pi / 2)
interval_length = b - a

lower_bound = m * interval_length
upper_bound = M * interval_length
integral_result = sympy.integrate(f, (x, a, b))

print("m = {}, M = {}, b - a = {}".format(m, M, interval_length))
print("Lower bound: {}, Upper bound: {}".format(lower_bound, upper_bound))
print("Integral result: {}".format(integral_result))